package ui;

import java.awt.BorderLayout;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryPoolMXBean;

import javax.swing.JPanel;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;

public class MemoryMonitorPanel extends JPanel
{
	public Surface surface;
	// Get memory pools.
	static java.util.List<MemoryPoolMXBean> pool = ManagementFactory
		.getMemoryPoolMXBeans();
	// Total number of memory pools.
	static int poolSize = pool.size();

	public MemoryMonitorPanel()
	{
		setLayout( new BorderLayout() );
		setBorder( new TitledBorder( new EtchedBorder(), "Memory Monitor" ) );
		add( surface = new Surface( this ) );
	}
}
